using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using DotNetNuke;
using DotNetNuke.Common;
using DotNetNuke.Common.Utilities;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Services.Search;
using System.Collections;
namespace Jfc007.WebLib
{
    public class Pop3ServerController
    {
        public void AddPop3Server(Pop3ServerInfo pop3)
        {
            DataProvider.Instance().AddPop3Server(pop3.PortalId, pop3.ServerName, pop3.Port, pop3.User,
                pop3.Password, pop3.UseSsl);
        }

        public void DeletePop3Server(int portalId)
        {
            DataProvider.Instance().DeletePop3Server(portalId);
        }

        public Pop3ServerInfo GetPop3Server(int portalId)
        {
            return CBO.FillObject<Pop3ServerInfo>(DataProvider.Instance().GetPop3Server(portalId));
        }

        public void UpdatePop3Server(Pop3ServerInfo pop3)
        {
            DataProvider.Instance().UpdatePop3Server(pop3.PortalId, pop3.ServerName, pop3.Port, pop3.User,
                pop3.Password, pop3.UseSsl);
        }

        public int GetWebLibModuleId(int portalId)
        {
            return DataProvider.Instance().GetWebLibModuleId(portalId);
        }

    }
}
